//
//  ConBasicTableViewController.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/13.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "ConBasicTableViewController.h"
#import "GGIndicatorHud.h"
#import "LottieLoading.h"

@interface ConBasicTableViewController ()

@property (nonatomic,strong) UILabel *noDataLab;

@end

@implementation ConBasicTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)showClearBgWaiter
{
//    [GGIndicatorHud showIndicatorInView:self.view];
    [LottieLoading showLoadingInView:self.view];
}
- (void)hideWaiter
{
//    [GGIndicatorHud hideIndicatorHudInView:self.view];
    [LottieLoading hideLoadingInView:self.view];
}
- (void)showWinWaiter
{
    [LottieLoading showLoadingInView:self.view];
}
- (void)hideWinWaiter
{
    [GGIndicatorHud hideIndicatorHudInView:self.view];
}

#pragma -------------------noDataLab-------------------
- (void)showNoDataLab:(UIView *)view range:(CGRect)frame title:(NSString *)tips;
{
    self.noDataLab.text = tips;
    self.noDataLab.size = [self.noDataLab sizeThatFits:CGSizeMake(frame.size.width, frame.size.height)];
    self.noDataLab.center = CGPointMake(frame.size.width*0.5, frame.origin.y+frame.size.height*0.5);
    [view addSubview:self.noDataLab];
}
- (void)hideNoDataLab
{
    if (self.noDataLab.superview) {
        [self.noDataLab removeFromSuperview];
    }
}
- (UILabel *)noDataLab
{
    if (!_noDataLab) {
        _noDataLab = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, ScreenW, 20)];
        _noDataLab.font = Font(16);
        _noDataLab.numberOfLines = 0;
        _noDataLab.backgroundColor = [UIColor clearColor];
        _noDataLab.textColor = [UIColor grayColor];
    }
    return _noDataLab;
}

@end
